﻿Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting.Conditions

<TestClass()> _
Public Class procCreateLoadedAssembly
    Inherits DatabaseTestClass

    Sub New()
        InitializeComponent()
    End Sub

    <TestInitialize()> _
    Public Sub TestInitialize()
        InitializeTest()
    End Sub

    <TestCleanup()> _
    Public Sub TestCleanup()
        CleanupTest()
    End Sub



#Region "Designer support code"

    'NOTE: The following procedure is required by the Designer
    'It can be modified using the Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
    Dim UT000005_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000005_ScalarValue_FullName As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000005_ScalarValue_Location As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000005_PretestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000005_PosttestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(procCreateLoadedAssembly))
    Me.UT000005Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    UT000005_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000005_ScalarValue_FullName = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000005_ScalarValue_Location = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000005_PretestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000005_PosttestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    '
    'UT000005Data
    '
    Me.UT000005Data.PosttestAction = UT000005_PosttestAction
    Me.UT000005Data.PretestAction = UT000005_PretestAction
    Me.UT000005Data.TestAction = UT000005_TestAction
    '
    'UT000005_TestAction
    '
    UT000005_TestAction.Conditions.Add(UT000005_ScalarValue_FullName)
    UT000005_TestAction.Conditions.Add(UT000005_ScalarValue_Location)
    resources.ApplyResources(UT000005_TestAction, "UT000005_TestAction")
    '
    'UT000005_ScalarValue_FullName
    '
    UT000005_ScalarValue_FullName.ColumnNumber = 1
    UT000005_ScalarValue_FullName.Enabled = True
    UT000005_ScalarValue_FullName.ExpectedValue = "FullName"
    UT000005_ScalarValue_FullName.Name = "UT000005_ScalarValue_FullName"
    UT000005_ScalarValue_FullName.NullExpected = False
    UT000005_ScalarValue_FullName.ResultSet = 1
    UT000005_ScalarValue_FullName.RowNumber = 1
    '
    'UT000005_ScalarValue_Location
    '
    UT000005_ScalarValue_Location.ColumnNumber = 2
    UT000005_ScalarValue_Location.Enabled = True
    UT000005_ScalarValue_Location.ExpectedValue = "Location"
    UT000005_ScalarValue_Location.Name = "UT000005_ScalarValue_Location"
    UT000005_ScalarValue_Location.NullExpected = False
    UT000005_ScalarValue_Location.ResultSet = 1
    UT000005_ScalarValue_Location.RowNumber = 1
    '
    'UT000005_PretestAction
    '
    resources.ApplyResources(UT000005_PretestAction, "UT000005_PretestAction")
    '
    'UT000005_PosttestAction
    '
    resources.ApplyResources(UT000005_PosttestAction, "UT000005_PosttestAction")
  End Sub

#End Region

#Region "Additional test attributes"
  '
  ' You can use the following additional attributes as you write your tests:
  '
  ' Use ClassInitialize to run code before running the first test in the class
  ' <ClassInitialize()> Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
  ' End Sub
  '
  ' Use ClassCleanup to run code after all tests in a class have run
  ' <ClassCleanup()> Public Shared Sub MyClassCleanup()
  ' End Sub
  '
#End Region


  <TestMethod()> _
  Public Sub UT000005()
    Dim testActions As DatabaseTestActions = Me.UT000005Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  Private UT000005Data As DatabaseTestActions
End Class

